﻿#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H

#include <QMainWindow>
#include <QKeyEvent>
#include <QSqlDatabase>
#include "dbtools.h"

namespace Ui {
class LoginWindow;
}

class LoginWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit LoginWindow(Dbtools *db,QWidget *parent = nullptr);
    ~LoginWindow();


    //重写paintEvent事件 画背景图
    void paintEvent(QPaintEvent *);
    void keyPressEvent(QKeyEvent * event);
private:
    Ui::LoginWindow *ui;
    Dbtools *dbtools;
    void login();
    void openCloudPage();
    void resetSetting();

protected:
   bool eventFilter(QObject *watched, QEvent *event);
};


#endif // LOGINWINDOW_H
